package com.xxxx.config;

import com.xxxx.dao.BookDao;
import com.xxxx.service.BookService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * Created By ShaoXikai on 2022/7/20
 */
@Configuration
@ComponentScan("com.xxxx.*")
public class SpringConfig {

    @Bean("bookDao")
    public BookDao getBean1() {
        return new BookDao();
    }

    @Bean("bookService")
    public BookService getBean2() {
        return new BookService();
    }

}
